package com.iqiyi.pps.epg.web.thread;

import com.iqiyi.pps.epg.core.model.push.AutoPushMsg;
import com.iqiyi.pps.epg.core.service.push.AutoPushMsgService;
import com.iqiyi.pps.epg.core.utils.ApplicationContextUtil;

import java.util.List;

/**
 * Created by Administrator on 2016/7/5.
 */
public class SaveAutoPushToDevicesThread implements Runnable  {

    private List<AutoPushMsg> autoPushMsgs;

    public SaveAutoPushToDevicesThread(List<AutoPushMsg> autoPushMsgs) {
        this.autoPushMsgs = autoPushMsgs;
    }

    @Override
    public void run() {
        AutoPushMsgService autoPushMsgService = (AutoPushMsgService) ApplicationContextUtil.getBean(AutoPushMsgService.class);
        autoPushMsgService.saveList(autoPushMsgs);
    }
}
